package de.stefanocke.roo.wicket.templates

import de.stefanocke.roo.wicket.Stereotypes

class BasePageTemplate extends JavaHtmlTemplate{
	
	override String javaClassNameWhenNew(){
		"BasePage"
	}
	
	override String stereotype(){
		Stereotypes::BASE_PAGE
	}
	
	override buildJavaContents(){
		import_("org.apache.wicket.markup.html.WebPage")
		'''
		/**
		 * All pages of the application inherit from this one to get common layout.
		 */
		«stereotypeAnnotation»
		public abstract class «simpleTypeName» extends WebPage {
		
			private static final long serialVersionUID = 1L;
		
		}
		'''
	}
	
	override buildHtmlHead(){
		'''
		<title>Title</title>
		<link rel="stylesheet" type="text/css" href="style.css" />
		'''
	}
	override buildHtmlBody(){
		'''
		<div id="header">
			<h1>Title</h1>
		</div>
		<div id="main">
			<div id="main2">
				<div id="sidebar">
				</div>
				<div id="content">
					<wicket:child></wicket:child>
				</div>
				<div class="clearing">&nbsp;</div>
			</div>
		</div>
		<div id="footer">
			<p>Footer</p>
		</div>
		'''
	}
}